#!/bin/bash

set -o errexit
set -o pipefail
set -o nounset

alembic upgrade head

# If we do not use python-socketio, we can increase the worker process number here
# https://python-socketio.readthedocs.io/en/latest/server.html#scalability-notes
# https://python-socketio.readthedocs.io/en/latest/server.html#eventlet-with-gunicorn
gunicorn project.asgi:app -w 1 -k uvicorn.workers.UvicornWorker --bind 0.0.0.0:8000 --chdir=/app